Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add status page summary API #1927

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Empty2k12
Copy link
Contributor

@Empty2k12 Empty2k12 commented Jul 19, 2022

Description

This adds a CORS enabled Summary API for status pages. This includes the current status of the monitor.

http://localhost:3001/api/status-page/my-status-page/summary

{"incident":null,"publicGroupList":[{"id":1,"name":"Services","weight":1,"monitorList":[{"id":1,"name":"Home Page","sendUrl":0,"type":"http","status":"up"}]}],"maintenanceList":[]}

The feature can then be used by other web pages to display the status of different services, without having to request both /api/status-page/default and /api/status-page/heartbeat/default at the cost of only knowing the up or down status. This offers some more flexibility over the already implemented badges.

Type of change

Please delete any options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review
  • I have tested my code
  • I have commented my code, particularly in hard-to-understand areas
    (including JSDoc for methods)
  • My changes generate no new warnings

@Saibamen
Copy link
Contributor

Why only up and down?

@Empty2k12
Copy link
Contributor Author

If you need more info, you can use /api/status-page/default and /api/status-page/heartbeat/default

This is really only supposed to be a summary, which monitors exist and what is their status. Similar to the badges but for all monitors.

@pemassi
Copy link
Contributor

pemassi commented Jul 23, 2022

Cloud you check this issue to test on your machine?

#1874

I was able to run sqllite on M1

@Empty2k12
Copy link
Contributor Author

@pemassi Thanks with your setup I was able to get it running.

I have fixed the PR and hidden the config JSON object in the summary API.

@codeman1o1

This comment was marked as spam.

@Empty2k12

This comment was marked as spam.

@Empty2k12
Copy link
Contributor Author

@louislam what's holding a merge up? Anything I could change or improve?

server/model/monitor.js Outdated Show resolved Hide resolved
@juzhiyuan

This comment was marked as off-topic.

@louislam

This comment was marked as resolved.

@Empty2k12

This comment was marked as resolved.

Computroniks

This comment was marked as resolved.

Empty2k12 and others added 4 commits January 10, 2023 10:41
Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
Computroniks

This comment was marked as resolved.

@louislam louislam added this to the 2.0.0 milestone Jul 15, 2023
@CommanderStorm CommanderStorm mentioned this pull request Jul 28, 2023
2 tasks
@louislam louislam modified the milestones: 2.0.0, Pending Oct 16, 2023
@CommanderStorm CommanderStorm added area:status-page Everything related to the status page area:api concearning the api or automation labels Feb 12, 2024
@github-actions github-actions bot added pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again and removed pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api concearning the api or automation area:status-page Everything related to the status page pr:needs review this PR needs a review by maintainers or other community members pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants